<template>
  <div class="pagecom">
    <el-pagination
    :current-page="currentPage"
    :page-sizes="pageSizes"
    :page-size="pageSize"
    :total="total"
    layout="total, sizes, prev, pager, next, jumper"
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    currentPage: {
      type: Number,
      default: () => {}
    },
    pageSizes: {
      type: Array,
      default: () => {}
    },
    pageSize: {
      type: Number,
      default: () => {}
    },
    total: {
      type: Number,
      default: () => {}
    }
  },
  methods: {
    handleSizeChange (val) {
      this.$emit('sizeChange', val);
    },
    handleCurrentChange (val) {
      this.$emit('currentChange', val);
    }
  }
}
</script>
